﻿<UserControl x:Class="MEFedMVVMDemo.Views.AddNewUser"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:ViewModelLocator="http:\\www.codeplex.com\MEFedMVVM" mc:Ignorable="d" 
			 ViewModelLocator:ViewModelLocator.NonSharedViewModel="AddNewUserViewModel"
             d:DesignHeight="300" d:DesignWidth="300">
	<UserControl.Background>
		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="Black" Offset="0.341"/>
			<GradientStop Color="#FFF9580D" Offset="1"/>
			<GradientStop Color="#FF441803" Offset="0.651"/>
		</LinearGradientBrush>
	</UserControl.Background>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
			<RowDefinition Height="40"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="50" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        
        <Border Grid.ColumnSpan="2" Margin="10,0">
            <TextBlock Text="Add new user" VerticalAlignment="Center" Margin="10,0,0,0" Foreground="White" FontWeight="Bold" FontSize="13.333" />
        </Border>

        <TextBlock Text="Name" Grid.Row="1" Foreground="White" HorizontalAlignment="Right" VerticalAlignment="Center" />
		<TextBox Text="{Binding NewUser.Name, Mode=TwoWay, ValidatesOnDataErrors=True}" Grid.Column="1" Grid.Row="1" Foreground="White" Background="#FFA59C9C" VerticalAlignment="Center" MinWidth="200" HorizontalAlignment="Left" Margin="5,0,0,0" />

        <TextBlock Text="Surname" Grid.Row="2" Foreground="White" HorizontalAlignment="Right" VerticalAlignment="Center" />
		<TextBox Text="{Binding NewUser.Surname, Mode=TwoWay, ValidatesOnDataErrors=True}" Grid.Column="1" Grid.Row="2" Foreground="White" Background="#FFA59C9C" VerticalAlignment="Center" MinWidth="200" HorizontalAlignment="Left" Margin="5,0,0,0" />

        <TextBlock Text="Age" Grid.Row="3" Foreground="White" HorizontalAlignment="Right" VerticalAlignment="Center" />
		<TextBox Text="{Binding NewUser.Age, Mode=TwoWay, ValidatesOnDataErrors=True}" Grid.Column="1" Grid.Row="3" Foreground="White" Background="#FFA59C9C" VerticalAlignment="Center" MinWidth="200" HorizontalAlignment="Left" Margin="5,0,0,0" />
		
		<StackPanel HorizontalAlignment="Right" Grid.Row="4" Grid.ColumnSpan="2" Orientation="Horizontal">
			<Button Command="{Binding AddNewUserCommand}" CommandParameter="{Binding NewUser}" Content="Add" Margin="5" Width="50" Height="30" />
			<Button Command="{Binding CancelCommand}" Content="Cancel" Margin="5"  Width="50" Height="30" />
		</StackPanel>
    </Grid>
</UserControl>
